#ifndef CALIBTHREAD_H
#define CALIBTHREAD_H

#include <QThread>
#include <QMutex>
#include "handEyeCalib.hpp"
#include <Eigen/Dense>
#include <opencv2/opencv.hpp>

class calibThread : public QThread
{
        Q_OBJECT
public:
    explicit calibThread(QObject *parent = nullptr);
    ~calibThread();

    HandEyeCalib* myHandEyeCalib;
    void SetParams(std::vector<cv::Mat> &images, std::vector<std::vector<double>> &poses);
    void saveCalibData(std::vector<cv::Mat> &images, std::vector<std::vector<double>> &poses);

    void run() override;

signals:
    void sendMatrix(std::vector<double> matrix);    // cameraToEnd
    void sendIntrinsic(std::vector<double> intrinsic);    // intrinsic
    void sendRMS(double rms);

};

#endif // CALIBTHREAD_H
